package info.mrchen.gae.weibo2mail.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LoginRequiredServlet extends HttpServlet {
	protected void doGet(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		String backUrl = request.getParameter("continue");
		if (backUrl == null) {
			response.sendRedirect("/");
			return;
		}

		request.setAttribute("backUrl", backUrl);
		request.getRequestDispatcher("/loginRequired.jsp").forward(request,
				response);
	}
}
